
 //1.导入路由模块
 import VueRouter from 'vue-router'
//导入子组件
 import homeContainer from "./components/tabbar/home.vue"
 import memberContainer from "./components/tabbar/member.vue"
 import searchContainer from "./components/tabbar/search.vue"
 import shopcarContainer from "./components/tabbar/shopcar.vue"
 import newsList from './components/newsList/newslist.vue'
 import newsInfo from './components/newsList/newsInfo.vue'
 import photoList from './components/photoList/photoList.vue'
 import photoInfo from './components/photoList/photoInfo.vue'
 import shoppinglist from './components/shopping/shoppinglist.vue'
 import shopinfo from './components/shopping/shopinfo.vue'
 import goodsDecs from './components/shopping/goodsDecs.vue'
 import goodscomment from './components/shopping/goodscomment.vue'



 //3.创建路由对象
 var router=new VueRouter({
     routes:[
       {path:"/",redirect:"/home"},//重定向
       {path:"/home",component:homeContainer},
       {path:"/member",component:memberContainer},
       {path:"/shopcar",component:shopcarContainer},
       {path:"/search",component:searchContainer},
       {path:"/home/newsList",component:newsList},
       {path:"/home/newsInfo/:id",component:newsInfo},
       {path:"/home/photoList",component:photoList},
       {path:"/home/photoInfo/:id",component:photoInfo},
       {path:"/home/shoppinglist",component:shoppinglist},
       {path:"/home/shopinfo/:id",component:shopinfo},
       {path:"/home/goodsdecs/:id",component:goodsDecs,name:"goodsDecs"},
       {path:"/home/goodscomment/:id",component:goodscomment,name:"goodscomment"}
     ],
     linkActiveClass:"mui-active"//将默认的高亮样式，替换为自己的mui-active
   
 })
 export default router